<template>
  <div>
    <h2>最新要闻</h2>
    <ul>
        <li><router-link to="/lastNewsDetail?lastId=1001">实拍国产早期型号卡车炮猛烈开火</router-link></li>
        <li><a href="#" @click="goLastNewsDetail">部分西方国家“自欺欺人”拖累全球抗疫努力</a></li>
        <li>暖新闻 “台州80岁奶奶街头卖花”，被优雅到了</li>
    </ul>
  </div>
</template>

<script lang='ts'>
import {ref,reactive} from 'vue'
import {useRouter} from 'vue-router'
export default{
 setup(){
  const router=useRouter()
  const goLastNewsDetail=(e:MouseEvent):void=>{
    e.preventDefault()
    router.push({
      path:'/lastNewsDetail',
      query:{
        lastId:'1002'
      }
    })
  }
  return{
    goLastNewsDetail
  }
 }
}
</script>

<style lang='scss' scoped>
</style>